﻿<%@ Page Title="" Language="C#" MasterPageFile="~/GTAMaster.Master" AutoEventWireup="true"
    CodeBehind="Tasks.aspx.cs" Inherits="GTA.Web.Pages.Tasks" EnableViewState="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fieldset>
        <legend>Filtro</legend>
        <table style="width: 100%;">
            <tr>
                <td>
                    Projeto
                </td>
                <td>
                    Respons&aacute;vel
                </td>
            </tr>
            <tr>
                <td>
                    <asp:ListBox ID="lstProjects" SelectionMode="Multiple" runat="server" AutoPostBack="true"
                        EnableViewState="true" OnSelectedIndexChanged="lstProjects_SelectedIndexChanged"
                        Width="100%"></asp:ListBox>
                </td>
                <td>
                    <asp:ListBox ID="lstResponsibles" SelectionMode="Multiple" runat="server" Width="100%">
                    </asp:ListBox>
                </td>
            </tr>
            <tr>
                <td>
                    Categoria
                </td>
                <td>
                    Status
                </td>
            </tr>
            <tr>
                <td>
                    <asp:ListBox ID="lstCategories" SelectionMode="Multiple" runat="server" Width="100%">
                    </asp:ListBox>
                </td>
                <td>
                    <asp:ListBox ID="lstStates" SelectionMode="Multiple" runat="server" Width="100%">
                    </asp:ListBox>
                </td>
            </tr>
            <tr>
                <td>
                    <fieldset>
                        <legend>Per&iacute;odo In&iacute;cio Previsto</legend>
                        <table>
                            <tr>
                                <td>
                                    De
                                </td>
                                <td>
                                    At&eacute;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtFilterDateScheduleStartIni" ReadOnly="true" runat="server"></asp:TextBox>
                                    <asp:ImageButton ID="ibFindScheduleStartFilterFrom" runat="server" Width="15px" Height="15px"
                                        OnClick="ibFindScheduleStartFilterFrom_Click" ImageUrl="~/Files/Images/find.gif"
                                        AlternateText="Definir a data" />
                                    <asp:ImageButton ID="ibClearDateStartFrom" runat="server" Width="15px" Height="15px"
                                        OnClick="ibClearDateStartFrom_Click" ImageUrl="~/Files/Images/refresh.png" AlternateText="Limpar a data" />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtFilterDateScheduleStartEnd" ReadOnly="true" runat="server"></asp:TextBox>
                                    <asp:ImageButton ID="ibFindScheduleStartFilterTo" runat="server" Width="15px" Height="15px"
                                        OnClick="ibFindScheduleStartFilterTo_Click" ImageUrl="~/Files/Images/find.gif"
                                        AlternateText="Definir a data" />
                                    <asp:ImageButton ID="ibClearDateStartTo" runat="server" Width="15px" Height="15px"
                                        OnClick="ibClearDateStartTo_Click" ImageUrl="~/Files/Images/refresh.png" AlternateText="Limpar a data" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
                <td>
                    <fieldset>
                        <legend>Per&iacute;odo T&iacute;rmino Previsto</legend>
                        <table>
                            <tr>
                                <td>
                                    De
                                </td>
                                <td>
                                    At&eacute;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtFilterDateScheduleEndIni" ReadOnly="true" runat="server"></asp:TextBox>
                                    <asp:ImageButton ID="ibFindScheduleEndFilterFrom" runat="server" Width="15px" Height="15px"
                                        OnClick="ibFindScheduleEndFilterFrom_Click" ImageUrl="~/Files/Images/find.gif"
                                        AlternateText="Definir a data" />
                                    <asp:ImageButton ID="ibClearDateEndFrom" runat="server" Width="15px" Height="15px"
                                        OnClick="ibClearDateEndFrom_Click" ImageUrl="~/Files/Images/refresh.png" AlternateText="Limpar a data" />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtFilterDateScheduleEndEnd" ReadOnly="true" runat="server"></asp:TextBox>
                                    <asp:ImageButton ID="ibFindScheduleEndFilterTo" runat="server" Width="15px" Height="15px"
                                        OnClick="ibFindScheduleEndFilterTo_Click" ImageUrl="~/Files/Images/find.gif"
                                        AlternateText="Definir a data" />
                                    <asp:ImageButton ID="ibClearDateEndTo" runat="server" Width="15px" Height="15px"
                                        OnClick="ibClearDateEndTo_Click" ImageUrl="~/Files/Images/refresh.png" AlternateText="Limpar a data" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: left;">
                    Task ID
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: left;">
                    <asp:TextBox ID="txtTaskID" MaxLength="8" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="cmdSearch" runat="server" Text="Pesquisar" OnClick="cmdSearch_Click" />
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="cmdClean" runat="server" Text="Limpar" OnClick="cmdClean_Click" />
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset>
        <legend>Cen&aacute;rios de Arquitetura</legend>
        <div style="height: 300px; overflow: auto;">
            <table style="width: 98%;" class="Grid">
                <tr>
                    <td class="GridHeader">
                        Projeto
                    </td>
                    <td class="GridHeader">
                        Tipo
                    </td>
                    <td class="GridHeader">
                        Respons&aacute;vel
                    </td>
                    <td class="GridHeader">
                        T&iacute;tulo
                    </td>
                    <td class="GridHeader">
                        Status
                    </td>
                    <td class="GridHeader">
                        ID
                    </td>
                    <td class="GridHeader">
                        In&iacute;cio Previsto
                    </td>
                    <td class="GridHeader">
                        T&eacute;rmino Previsto
                    </td>
                    <td class="GridHeader">
                        In&iacute;cio
                    </td>
                    <td class="GridHeader">
                        Fim
                    </td>
                    <td class="GridHeader">
                        Hts. Estim.
                    </td>
                    <td class="GridHeader">
                        Raz&atilde;o
                    </td>
                </tr>
                <asp:Repeater ID="rptScenarios" runat="server" OnItemDataBound="rptScenarios_ItemDataBound">
                    <ItemTemplate>
                        <tr id="rowItem" runat="server">
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "Project.Name")%>
                            </td>
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "Category.Description")%>
                            </td>
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "DesignedTo.Name")%>
                            </td>
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "Title")%>
                            </td>
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "State.Description")%>
                            </td>
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "ID")%>
                            </td>
                            <td class="GridLine">
                                <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "ScheduleEstimatedStart").ToString()) != DateTime.MinValue ? DataBinder.Eval(Container.DataItem, "ScheduleEstimatedStart") : "&nbsp;"%>
                            </td>
                            <td class="GridLine">
                                <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "ScheduleEstimatedEnd").ToString()) != DateTime.MinValue ? DataBinder.Eval(Container.DataItem, "ScheduleEstimatedEnd") : "&nbsp;"%>
                            </td>
                            <td class="GridLine">
                                <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "ScheduleRealizedStart").ToString()) != DateTime.MinValue ? DataBinder.Eval(Container.DataItem, "ScheduleRealizedStart") : "&nbsp;"%>
                            </td>
                            <td class="GridLine">
                                <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "ScheduleRealizedEnd").ToString()) != DateTime.MinValue ? DataBinder.Eval(Container.DataItem, "ScheduleRealizedEnd") : "&nbsp;"%>
                            </td>
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "ScheduleEstimatedHours")%>
                            </td>
                            <td class="GridLine">
                                <%#DataBinder.Eval(Container.DataItem, "Reason")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
        <br />
        <hr />
        <span class="Title">Total de Tarefas:&nbsp;</span>
        <asp:Label ID="lblQtdTasks" runat="server"></asp:Label>
        <br />
        <hr />
        <fieldset>
            <legend>Legenda</legend>
            <table style="width: 100%;">
                <tr>
                    <td>
                        <div style="width: 20px; height: 20px;" class="RowItemFinished">
                        </div>
                        Finalizado
                    </td>
                    <td>
                        <div style="width: 20px; height: 20px;" class="RowItemCanceled">
                        </div>
                        Cancelado
                    </td>
                    <td>
                        <div style="width: 20px; height: 20px;" class="RowItemDeliveryOverdue">
                        </div>
                        Entrega em Atraso
                    </td>
                    <td>
                        <div style="width: 20px; height: 20px;" class="RowItemStartOverdue">
                        </div>
                        In&iacute;cio em Atraso
                    </td>
                    <td>
                        <div style="width: 20px; height: 20px;" class="RowItemDeliveryAlert">
                        </div>
                        Alerta de Atraso na Entrega (2 dias)
                    </td>
                    <td>
                        <div style="width: 20px; height: 20px;" class="RowItemStartAlert">
                        </div>
                        Alerta de Atraso no In&iacute;cio (2 dias)
                    </td>
                </tr>
            </table>
        </fieldset>
    </fieldset>
    <div id="dvDtScheduleStartFrom" runat="server" visible="false" style="position: absolute;
        top: 40%; left: 30%; border-top: solid 1px gray; border-right: solid 2px gray;
        border-bottom: solid 2px gray; border-left: solid 1 px gray; width: auto; height: auto;
        background-color: White; padding: 3px;">
        <asp:Label ID="lblTitleStartFrom" CssClass="Title" runat="server"></asp:Label>
        <asp:Calendar ID="dtScheduleStartFrom" OnSelectionChanged="dtScheduleStartFrom_SelectionChanged"
            runat="server" SelectionMode="DayWeek"></asp:Calendar>
    </div>
    <div id="dvDtScheduleStartTo" runat="server" visible="false" style="position: absolute;
        top: 40%; left: 30%; border-top: solid 1px gray; border-right: solid 2px gray;
        border-bottom: solid 2px gray; border-left: solid 1 px gray; width: auto; height: auto;
        background-color: White; padding: 3px;">
        <asp:Label ID="lblTitleStartTo" CssClass="Title" runat="server"></asp:Label>
        <asp:Calendar ID="dtScheduleStartTo" OnSelectionChanged="dtScheduleStartTo_SelectionChanged"
            runat="server" SelectionMode="DayWeek"></asp:Calendar>
    </div>
    <div id="dvDtScheduleEndFrom" runat="server" visible="false" style="position: absolute;
        top: 40%; left: 30%; border-top: solid 1px gray; border-right: solid 2px gray;
        border-bottom: solid 2px gray; border-left: solid 1 px gray; width: auto; height: auto;
        background-color: White; padding: 3px;">
        <asp:Label ID="lblTitleEndFrom" CssClass="Title" runat="server"></asp:Label>
        <asp:Calendar ID="dtScheduleEndFrom" OnSelectionChanged="dtScheduleEndFrom_SelectionChanged"
            runat="server" SelectionMode="DayWeek"></asp:Calendar>
    </div>
    <div id="dvDtScheduleEndTo" runat="server" visible="false" style="position: absolute;
        top: 40%; left: 30%; border-top: solid 1px gray; border-right: solid 2px gray;
        border-bottom: solid 2px gray; border-left: solid 1 px gray; width: auto; height: auto;
        background-color: White; padding: 3px;">
        <asp:Label ID="lblTitleEndTo" CssClass="Title" runat="server"></asp:Label>
        <asp:Calendar ID="dtScheduleEndTo" OnSelectionChanged="dtScheduleEndTo_SelectionChanged"
            runat="server" SelectionMode="DayWeek"></asp:Calendar>
    </div>
</asp:Content>
